<template>
    <div class="wrapper">
      <swiper :options="swiperOption" class="swiper">
        <!-- slides -->
        <swiper-slide v-for="item of imgs" :key = "item.id">
          <img class="swiper-img" :src="item.url">
        </swiper-slide>
        <div class="swiper-pagination"  slot="pagination"></div>
        <div class="swiper-button-prev" slot="button-prev"></div>
        <div class="swiper-button-next" slot="button-next"></div>
      </swiper>
      <div class="info-list">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span class="title">信息速览</span>
          </div>
          <div class="text item">
            <div class="info" @click="clickPart1">僵尸企业分类</div>
            <div class="info" @click="clickPart2">僵尸企业鉴定标准</div>
            <div class="info" @click="clickPart3">僵尸企业政策</div>
            <div class="info" @click="clickPart4">僵尸企业查询</div>
          </div>
        </el-card>
      </div>
    </div>
</template>

<script>
import { swiper, swiperSlide } from 'vue-awesome-swiper'
export default {
  name: 'HomeSwiper',
  data () {
    return {
      swiperOption: {
        loop: true,
        pagination: '.swiper-pagination'
      },
      imgs: [{
        id: '001',
        url: 'static/imgs/1.jpg'
      }, {
        id: '002',
        url: 'static/imgs/2.jpg'
      }, {
        id: '003',
        url: 'static/imgs/3.jpg'
      }, {
        id: '004',
        url: 'static/imgs/4.png'
      }, {
        id: '005',
        url: 'static/imgs/5.png'
      }, {
        id: '006',
        url: 'static/imgs/6.png'
      }],
      infomathon: [{
        title: '官方标准',
        id: '1'
      }, {
        title: 'CHK标准',
        id: '2'
      }, {
        title: 'FN-CHK标准',
        id: '1'
      }, {
        title: '官方标准',
        id: '1'
      }]
    }
  },
  components: {
    swiper,
    swiperSlide
  },
  methods: {
    clickPart1 () {
      this.$router.push('/news/part4')
    },
    clickPart2 () {
      this.$router.push('/standard')
    },
    clickPart3 () {
      this.$router.push('/news/part5')
    },
    clickPart4 () {
      this.$router.push('/search')
    }
  }
}
</script>

<style lang="stylus" scoped>
@import '~styles/varibies.styl'
  .wrapper{
    position: relative;
    // background: #F5F5F5;
    display: flex;
    // left: 30%;
    // right
    margin: 0;
    padding: 0;
    width: 100%;

  }
  .swiper{
    width: 100%;
    padding:0 2%;
    // position relative;
  }
    .swiper-button-prev{
      position absolute;
      left: 5rem;
    }
    .swiper-button-next{
      position absolute;
      right: 11rem;
    }
      .swiper-img{
        margin-top:3%;
        position: relative;
        left: 20%;
        right: 20%;
        width: 35%;
        height: 6rem;
        border: 1px black solid;
        padding: 0 2%;
      }
    .info-list{
      position: absolute;
      left: 65%;
      margin-top: 3%;
      width: 20%;
      height: 320px;
      // background: #F5F5F5;
      font-weight: bold;
      z-z-index: 2;
      margin-left: 10px;
      z-index: 99;
    }
    .title{
      font-size .4rem;
    }
     .text {
    font-size: 14px;
  }

  .item {
    margin-bottom: 10%;
    .info{
      margin .4rem 0;
      font-size .32rem;
      // border 1px solid black;
    }

  }

  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }
  .clearfix:after {
    clear: both
  }

  .box-card {
    margin-left: 0;
    margin-top -3%;
    // width: 40%;
    background: #F5F5F5;
    position: relative;
    // top: 0px;
    left: 30%;
    height: 350px;
  }
</style>
